<%= content_for :title, "Add Ons" %>
<%= turbo_stream_from [:add_ons, current_account] %>

<div>
  <div class="flex items-center justify-between">
    <h3 class="text-lg font-medium">Add Ons</h3>
  </div>

  <div class="mt-5">
    <div aria-label="Card" class="card card-bordered bg-base-100">
      <div class="card-body">
        <div class="text-right px-5 pt-5">
          <%= link_to new_add_on_path, title: t("scaffold.new.title", model: "Add On") do %>
            <button class="btn btn-primary btn-sm">
              <iconify-icon icon="lucide:plus" height="16"></iconify-icon>
              <span class="hidden sm:inline">New Add On</span>
            </button>
          <% end %>
        </div>
        <%= tag.div id: ("add_ons" if @pagy.pages == 1) do %>
          <%= render "add_ons/index", add_ons: @add_ons, cached: true %>

          <div class="hidden only:block text-center">
            <p class="mb-4 h3">Create your first Add On</p>
            <%= link_to t("scaffold.new.title", model: "Add On"), new_add_on_path, class: "btn btn-primary" %>
          </div>
        <% end %>
      </div>
    </div>
  </div>

  <%= render 'shared/pagination', pagy: @pagy %>
</div>
